<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html>  
    <head>  
        <title>height auto</title>  
        <style type="text/css">  
        html,body{text-align:center; margin:0px; padding:0px; height:100%;}  
            #box {  
            overflow:auto; border:solid 1px red; float:left; margin-left:auto; margin-right:auto; width:80%;   
            }  
              
            .subbox{  
                display:inline;  
                display:block;  
                  
                float:left;  
                width:100px;  
                  
                margin:50px;  
                border:solid 1px red;  
                height:50%;  
                  
            }  
              
            #box{height:100%;}  
              
              
            </style>  
        </head>  
        <body>  
            <div id="box">  
  
                <div class="subbox"></div>  
  
            </div>  
        </body>  
</html> 